﻿
using System;
using System.Data;
using System.Data.SqlClient;
namespace Model
{
	
	/// <summary>	 
	/// 购物车
	/// </summary>
	public class DbShippingCart
	{ 
		#region DbShippingCart
		/// <summary>
		/// 
		/// </summary>
		public DbShippingCart()
		{
		}
		/// <summary>	 
		/// 
		/// </summary>
		public DbShippingCart(Int32 cId)
		{
			this.cId = cId;
		
		}
		/// <summary>	 
		/// 
		/// </summary>		
		public DbShippingCart(DataRow dr)
		{
			int.TryParse(Convert.ToString(dr["cId"]),out cId);
			int.TryParse(Convert.ToString(dr["uId"]),out uId);
			this.sessionId = Convert.ToString(dr["sessionId"]);
			int.TryParse(Convert.ToString(dr["pId"]),out pId);
			this.pName = Convert.ToString(dr["pName"]);
			this.pCode = Convert.ToString(dr["pCode"]);
			this.pColor = Convert.ToString(dr["pColor"]);
			this.pSize = Convert.ToString(dr["pSize"]);
			this.pPic = Convert.ToString(dr["pPic"]);
			this.pWeight = Convert.ToDecimal(dr["pWeight"]);
			this.pPrice = Convert.ToDecimal(dr["pPrice"]);
			this.remarks = Convert.ToString(dr["remarks"]);
			if(dr["addTime"] != DBNull.Value)
				this.addTime = Convert.ToDateTime(dr["addTime"]);
			int.TryParse(Convert.ToString(dr["qty"]),out qty);
			
		}
		#endregion
		
		
		#region CId
		private Int32 cId;
		/// <summary>	 
		/// 
		/// AutoInc
		/// PK
		/// </summary>
		public Int32 CId
		{
			get{ return cId; }
			set{ cId= value; }
		}
		#endregion
		
		#region UId
		private Int32 uId;
		/// <summary>	 
		/// 用户Id
		/// </summary>
		public Int32 UId
		{
			get{ return uId; }
			set{ uId= value; }
		}
		#endregion
		
		#region SessionId
		private System.String sessionId;
		/// <summary>	 
		/// 
		/// </summary>
		public System.String SessionId
		{
			get{ return sessionId; }
			set{ sessionId= value; }
		}
		#endregion
		
		#region PId
		private Int32 pId;
		/// <summary>	 
		/// 产品Id
		/// </summary>
		public Int32 PId
		{
			get{ return pId; }
			set{ pId= value; }
		}
		#endregion
		
		#region PName
		private System.String pName;
		/// <summary>	 
		/// 产品名称
		/// </summary>
		public System.String PName
		{
			get{ return pName; }
			set{ pName= value; }
		}
		#endregion
		
		#region PCode
		private System.String pCode;
		/// <summary>	 
		/// 产品编号
		/// </summary>
		public System.String PCode
		{
			get{ return pCode; }
			set{ pCode= value; }
		}
		#endregion
		
		#region PColor
		private System.String pColor;
		/// <summary>	 
		/// 颜色
		/// </summary>
		public System.String PColor
		{
			get{ return pColor; }
			set{ pColor= value; }
		}
		#endregion
		
		#region PSize
		private System.String pSize;
		/// <summary>	 
		/// 尺寸
		/// </summary>
		public System.String PSize
		{
			get{ return pSize; }
			set{ pSize= value; }
		}
		#endregion
		
		#region PPic
		private System.String pPic;
		/// <summary>	 
		/// 图片
		/// </summary>
		public System.String PPic
		{
			get{ return pPic; }
			set{ pPic= value; }
		}
		#endregion
		
		#region PWeight
		private Decimal pWeight;
		/// <summary>	 
		/// 重量
		/// </summary>
		public Decimal PWeight
		{
			get{ return pWeight; }
			set{ pWeight= value; }
		}
		#endregion
		
		#region PPrice
		private Decimal pPrice;
		/// <summary>	 
		/// 价格
		/// </summary>
		public Decimal PPrice
		{
			get{ return pPrice; }
			set{ pPrice= value; }
		}
		#endregion
		
		#region Remarks
		private System.String remarks;
		/// <summary>	 
		/// 备注
		/// </summary>
		public System.String Remarks
		{
			get{ return remarks; }
			set{ remarks= value; }
		}
		#endregion
		
		#region AddTime
		private DateTime addTime;
		/// <summary>	 
		/// 添加时间
		/// </summary>
		public DateTime AddTime
		{
			get{ return addTime; }
			set{ addTime= value; }
		}
		#endregion
		
		#region Qty
		private Int32 qty;
		/// <summary>	 
		/// 数量
		/// </summary>
		public Int32 Qty
		{
			get{ return qty; }
			set{ qty= value; }
		}
		#endregion

	}
}
